

<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../">
<head>
  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Directory &mdash; O365  documentation</title>
      <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=b86133f3" />
      <link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=e59714d7" />

  
      <script src="../_static/jquery.js?v=5d32c60e"></script>
      <script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
      <script src="../_static/documentation_options.js?v=5929fcd5"></script>
      <script src="../_static/doctools.js?v=9bcbadda"></script>
      <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="../_static/js/theme.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Excel" href="excel.html" />
    <link rel="prev" title="Connection" href="connection.html" />
    <link href="../_static/css/style.css" rel="stylesheet" type="text/css">

</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >

          
          
          <a href="../index.html">
            
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usage.html">Detailed Usage</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../api.html">O365 API</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="account.html">Account</a></li>
<li class="toctree-l2"><a class="reference internal" href="address_book.html">Address Book</a></li>
<li class="toctree-l2"><a class="reference internal" href="calendar.html">Calendar</a></li>
<li class="toctree-l2"><a class="reference internal" href="category.html">Category</a></li>
<li class="toctree-l2"><a class="reference internal" href="connection.html">Connection</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Directory</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#O365.directory.Directory"><code class="docutils literal notranslate"><span class="pre">Directory</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.Directory.__init__"><code class="docutils literal notranslate"><span class="pre">Directory.__init__()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.Directory.get_current_user"><code class="docutils literal notranslate"><span class="pre">Directory.get_current_user()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.Directory.get_user"><code class="docutils literal notranslate"><span class="pre">Directory.get_user()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.Directory.get_user_direct_reports"><code class="docutils literal notranslate"><span class="pre">Directory.get_user_direct_reports()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.Directory.get_user_manager"><code class="docutils literal notranslate"><span class="pre">Directory.get_user_manager()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.Directory.get_users"><code class="docutils literal notranslate"><span class="pre">Directory.get_users()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#O365.directory.User"><code class="docutils literal notranslate"><span class="pre">User</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.__init__"><code class="docutils literal notranslate"><span class="pre">User.__init__()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.get_profile_photo"><code class="docutils literal notranslate"><span class="pre">User.get_profile_photo()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.new_message"><code class="docutils literal notranslate"><span class="pre">User.new_message()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.update_profile_photo"><code class="docutils literal notranslate"><span class="pre">User.update_profile_photo()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.about_me"><code class="docutils literal notranslate"><span class="pre">User.about_me</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.account_enabled"><code class="docutils literal notranslate"><span class="pre">User.account_enabled</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.age_group"><code class="docutils literal notranslate"><span class="pre">User.age_group</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.assigned_licenses"><code class="docutils literal notranslate"><span class="pre">User.assigned_licenses</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.assigned_plans"><code class="docutils literal notranslate"><span class="pre">User.assigned_plans</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.birthday"><code class="docutils literal notranslate"><span class="pre">User.birthday</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.business_phones"><code class="docutils literal notranslate"><span class="pre">User.business_phones</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.city"><code class="docutils literal notranslate"><span class="pre">User.city</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.company_name"><code class="docutils literal notranslate"><span class="pre">User.company_name</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.consent_provided_for_minor"><code class="docutils literal notranslate"><span class="pre">User.consent_provided_for_minor</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.country"><code class="docutils literal notranslate"><span class="pre">User.country</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.created"><code class="docutils literal notranslate"><span class="pre">User.created</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.department"><code class="docutils literal notranslate"><span class="pre">User.department</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.display_name"><code class="docutils literal notranslate"><span class="pre">User.display_name</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.employee_id"><code class="docutils literal notranslate"><span class="pre">User.employee_id</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.fax_number"><code class="docutils literal notranslate"><span class="pre">User.fax_number</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.full_name"><code class="docutils literal notranslate"><span class="pre">User.full_name</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.given_name"><code class="docutils literal notranslate"><span class="pre">User.given_name</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.hire_date"><code class="docutils literal notranslate"><span class="pre">User.hire_date</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.im_addresses"><code class="docutils literal notranslate"><span class="pre">User.im_addresses</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.interests"><code class="docutils literal notranslate"><span class="pre">User.interests</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.is_resource_account"><code class="docutils literal notranslate"><span class="pre">User.is_resource_account</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.job_title"><code class="docutils literal notranslate"><span class="pre">User.job_title</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.last_password_change"><code class="docutils literal notranslate"><span class="pre">User.last_password_change</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.legal_age_group_classification"><code class="docutils literal notranslate"><span class="pre">User.legal_age_group_classification</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.license_assignment_states"><code class="docutils literal notranslate"><span class="pre">User.license_assignment_states</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.mail"><code class="docutils literal notranslate"><span class="pre">User.mail</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.mail_nickname"><code class="docutils literal notranslate"><span class="pre">User.mail_nickname</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.mailbox_settings"><code class="docutils literal notranslate"><span class="pre">User.mailbox_settings</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.mobile_phone"><code class="docutils literal notranslate"><span class="pre">User.mobile_phone</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.my_site"><code class="docutils literal notranslate"><span class="pre">User.my_site</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.object_id"><code class="docutils literal notranslate"><span class="pre">User.object_id</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.office_location"><code class="docutils literal notranslate"><span class="pre">User.office_location</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.on_premises_sam_account_name"><code class="docutils literal notranslate"><span class="pre">User.on_premises_sam_account_name</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.other_mails"><code class="docutils literal notranslate"><span class="pre">User.other_mails</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.password_policies"><code class="docutils literal notranslate"><span class="pre">User.password_policies</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.password_profile"><code class="docutils literal notranslate"><span class="pre">User.password_profile</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.past_projects"><code class="docutils literal notranslate"><span class="pre">User.past_projects</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.postal_code"><code class="docutils literal notranslate"><span class="pre">User.postal_code</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.preferred_data_location"><code class="docutils literal notranslate"><span class="pre">User.preferred_data_location</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.preferred_language"><code class="docutils literal notranslate"><span class="pre">User.preferred_language</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.preferred_name"><code class="docutils literal notranslate"><span class="pre">User.preferred_name</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.provisioned_plans"><code class="docutils literal notranslate"><span class="pre">User.provisioned_plans</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.proxy_addresses"><code class="docutils literal notranslate"><span class="pre">User.proxy_addresses</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.responsibilities"><code class="docutils literal notranslate"><span class="pre">User.responsibilities</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.schools"><code class="docutils literal notranslate"><span class="pre">User.schools</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.show_in_address_list"><code class="docutils literal notranslate"><span class="pre">User.show_in_address_list</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.sign_in_sessions_valid_from"><code class="docutils literal notranslate"><span class="pre">User.sign_in_sessions_valid_from</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.skills"><code class="docutils literal notranslate"><span class="pre">User.skills</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.state"><code class="docutils literal notranslate"><span class="pre">User.state</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.street_address"><code class="docutils literal notranslate"><span class="pre">User.street_address</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.surname"><code class="docutils literal notranslate"><span class="pre">User.surname</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.type"><code class="docutils literal notranslate"><span class="pre">User.type</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.usage_location"><code class="docutils literal notranslate"><span class="pre">User.usage_location</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.user_principal_name"><code class="docutils literal notranslate"><span class="pre">User.user_principal_name</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#O365.directory.User.user_type"><code class="docutils literal notranslate"><span class="pre">User.user_type</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="excel.html">Excel</a></li>
<li class="toctree-l2"><a class="reference internal" href="group.html">Group</a></li>
<li class="toctree-l2"><a class="reference internal" href="mailbox.html">Mailbox</a></li>
<li class="toctree-l2"><a class="reference internal" href="message.html">Message</a></li>
<li class="toctree-l2"><a class="reference internal" href="onedrive.html">One Drive</a></li>
<li class="toctree-l2"><a class="reference internal" href="planner.html">Planner</a></li>
<li class="toctree-l2"><a class="reference internal" href="sharepoint.html">Sharepoint</a></li>
<li class="toctree-l2"><a class="reference internal" href="tasks.html">Tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="teams.html">Teams</a></li>
<li class="toctree-l2"><a class="reference internal" href="utils.html">Utils</a></li>
</ul>
</li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../index.html">O365</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../api.html">O365 API</a></li>
      <li class="breadcrumb-item active">Directory</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../_sources/api/directory.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul><div class="rst-breadcrumbs-buttons" role="navigation" aria-label="Sequential page navigation">
        <a href="connection.html" class="btn btn-neutral float-left" title="Connection" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="excel.html" class="btn btn-neutral float-right" title="Excel" accesskey="n">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
  </div>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="directory">
<h1>Directory<a class="headerlink" href="#directory" title="Link to this heading"></a></h1>
<dl class="py class" id="module-O365.directory">
<dt class="sig sig-object py" id="O365.directory.Directory">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">O365.directory.</span></span><span class="sig-name descname"><span class="pre">Directory</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">parent</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">con</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#Directory"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.Directory" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="utils/utils.html#O365.utils.utils.ApiComponent" title="O365.utils.utils.ApiComponent"><code class="xref py py-class docutils literal notranslate"><span class="pre">ApiComponent</span></code></a></p>
<dl class="py method">
<dt class="sig sig-object py" id="O365.directory.Directory.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">parent</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">con</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#Directory.__init__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.Directory.__init__" title="Link to this definition"></a></dt>
<dd><p>Represents the Active Directory</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>parent</strong> (<a class="reference internal" href="account.html#O365.account.Account" title="O365.account.Account"><em>Account</em></a>) – parent object</p></li>
<li><p><strong>con</strong> (<a class="reference internal" href="connection.html#O365.connection.Connection" title="O365.connection.Connection"><em>Connection</em></a>) – connection to use if no parent specified</p></li>
<li><p><strong>protocol</strong> (<a class="reference internal" href="connection.html#O365.connection.Protocol" title="O365.connection.Protocol"><em>Protocol</em></a>) – protocol to use if no parent specified
(kwargs)</p></li>
<li><p><strong>main_resource</strong> (<em>str</em>) – use this resource instead of parent resource
(kwargs)</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="O365.directory.Directory.get_current_user">
<span class="sig-name descname"><span class="pre">get_current_user</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#Directory.get_current_user"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.Directory.get_current_user" title="Link to this definition"></a></dt>
<dd><p>Returns the current logged-in user</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="O365.directory.Directory.get_user">
<span class="sig-name descname"><span class="pre">get_user</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#Directory.get_user"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.Directory.get_user" title="Link to this definition"></a></dt>
<dd><p>Returns a User by it’s id or user principal name</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>user</strong> (<em>str</em>) – the user id or user principal name</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>User for specified email</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="#O365.directory.User" title="O365.directory.User">User</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="O365.directory.Directory.get_user_direct_reports">
<span class="sig-name descname"><span class="pre">get_user_direct_reports</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">limit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em>, <em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">order_by</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">batch</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#Directory.get_user_direct_reports"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.Directory.get_user_direct_reports" title="Link to this definition"></a></dt>
<dd><p>Gets a list of direct reports for the user provided from the active directory</p>
<p>When querying the Active Directory the Users endpoint will be used.</p>
<p>Also using endpoints has some limitations on the querying capabilities.</p>
<p>To use query an order_by check the OData specification here:
<a class="reference external" href="http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/">http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/</a>
part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions
-complete.html</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>limit</strong> (<em>int</em><em> or </em><em>None</em>) – max no. of contacts to get. Over 999 uses batch.</p></li>
<li><p><strong>query</strong> (<a class="reference internal" href="utils/utils.html#O365.utils.utils.Query" title="O365.utils.utils.Query"><em>Query</em></a><em> or </em><em>str</em>) – applies a OData filter to the request</p></li>
<li><p><strong>order_by</strong> (<a class="reference internal" href="utils/utils.html#O365.utils.utils.Query" title="O365.utils.utils.Query"><em>Query</em></a><em> or </em><em>str</em>) – orders the result set based on this condition</p></li>
<li><p><strong>batch</strong> (<em>int</em>) – batch size, retrieves items in
batches allowing to retrieve more items than the limit.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>list of users</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[<a class="reference internal" href="#O365.directory.User" title="O365.directory.User">User</a>] or <a class="reference internal" href="utils/utils.html#O365.utils.utils.Pagination" title="O365.utils.utils.Pagination">Pagination</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="O365.directory.Directory.get_user_manager">
<span class="sig-name descname"><span class="pre">get_user_manager</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#Directory.get_user_manager"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.Directory.get_user_manager" title="Link to this definition"></a></dt>
<dd><p>Returns a Users’ manager by the users id, or user principal name</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>user</strong> (<em>str</em>) – the user id or user principal name</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>User for specified email</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="#O365.directory.User" title="O365.directory.User">User</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="O365.directory.Directory.get_users">
<span class="sig-name descname"><span class="pre">get_users</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">limit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em>, <em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">order_by</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">batch</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#Directory.get_users"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.Directory.get_users" title="Link to this definition"></a></dt>
<dd><p>Gets a list of users from the active directory</p>
<p>When querying the Active Directory the Users endpoint will be used.
Only a limited set of information will be available unless you have
access to scope ‘User.Read.All’ which requires App Administration
Consent.</p>
<p>Also using endpoints has some limitations on the querying capabilities.</p>
<p>To use query an order_by check the OData specification here:
<a class="reference external" href="http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/">http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/</a>
part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions
-complete.html</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>limit</strong> (<em>int</em><em> or </em><em>None</em>) – max no. of contacts to get. Over 999 uses batch.</p></li>
<li><p><strong>query</strong> (<a class="reference internal" href="utils/utils.html#O365.utils.utils.Query" title="O365.utils.utils.Query"><em>Query</em></a><em> or </em><em>str</em>) – applies a OData filter to the request</p></li>
<li><p><strong>order_by</strong> (<a class="reference internal" href="utils/utils.html#O365.utils.utils.Query" title="O365.utils.utils.Query"><em>Query</em></a><em> or </em><em>str</em>) – orders the result set based on this condition</p></li>
<li><p><strong>batch</strong> (<em>int</em>) – batch size, retrieves items in
batches allowing to retrieve more items than the limit.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>list of users</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[<a class="reference internal" href="#O365.directory.User" title="O365.directory.User">User</a>] or <a class="reference internal" href="utils/utils.html#O365.utils.utils.Pagination" title="O365.utils.utils.Pagination">Pagination</a></p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="O365.directory.User">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">O365.directory.</span></span><span class="sig-name descname"><span class="pre">User</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">parent</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">con</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#User"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.User" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="utils/utils.html#O365.utils.utils.ApiComponent" title="O365.utils.utils.ApiComponent"><code class="xref py py-class docutils literal notranslate"><span class="pre">ApiComponent</span></code></a></p>
<dl class="py method">
<dt class="sig sig-object py" id="O365.directory.User.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">parent</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">con</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#User.__init__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.User.__init__" title="Link to this definition"></a></dt>
<dd><p>Represents an Azure AD user account</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>parent</strong> (<a class="reference internal" href="account.html#O365.account.Account" title="O365.account.Account"><em>Account</em></a>) – parent object</p></li>
<li><p><strong>con</strong> (<a class="reference internal" href="connection.html#O365.connection.Connection" title="O365.connection.Connection"><em>Connection</em></a>) – connection to use if no parent specified</p></li>
<li><p><strong>protocol</strong> (<a class="reference internal" href="connection.html#O365.connection.Protocol" title="O365.connection.Protocol"><em>Protocol</em></a>) – protocol to use if no parent specified
(kwargs)</p></li>
<li><p><strong>main_resource</strong> (<em>str</em>) – use this resource instead of parent resource
(kwargs)</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="O365.directory.User.get_profile_photo">
<span class="sig-name descname"><span class="pre">get_profile_photo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#User.get_profile_photo"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.User.get_profile_photo" title="Link to this definition"></a></dt>
<dd><p>Returns the user profile photo</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>size</strong> (<em>str</em>) – 48x48, 64x64, 96x96, 120x120, 240x240,
360x360, 432x432, 504x504, and 648x648</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="O365.directory.User.new_message">
<span class="sig-name descname"><span class="pre">new_message</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">recipient</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">recipient_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">RecipientType.TO</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#User.new_message"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.User.new_message" title="Link to this definition"></a></dt>
<dd><p>This method returns a new draft Message instance with this
user email as a recipient</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>recipient</strong> (<a class="reference internal" href="utils/utils.html#O365.utils.utils.Recipient" title="O365.utils.utils.Recipient"><em>Recipient</em></a>) – a Recipient instance where to send this
message. If None the email of this contact will be used</p></li>
<li><p><strong>recipient_type</strong> (<a class="reference internal" href="message.html#O365.message.RecipientType" title="O365.message.RecipientType"><em>RecipientType</em></a>) – section to add recipient into</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>newly created message</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="message.html#O365.message.Message" title="O365.message.Message">Message</a> or None</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="O365.directory.User.update_profile_photo">
<span class="sig-name descname"><span class="pre">update_profile_photo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">photo</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/directory.html#User.update_profile_photo"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.directory.User.update_profile_photo" title="Link to this definition"></a></dt>
<dd><p>Updates this user profile photo
:param bytes photo: the photo data in bytes</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.about_me">
<span class="sig-name descname"><span class="pre">about_me</span></span><a class="headerlink" href="#O365.directory.User.about_me" title="Link to this definition"></a></dt>
<dd><p>A freeform text entry field for the user to describe themselves. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.account_enabled">
<span class="sig-name descname"><span class="pre">account_enabled</span></span><a class="headerlink" href="#O365.directory.User.account_enabled" title="Link to this definition"></a></dt>
<dd><p>true if the account is enabled; otherwise, false. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.age_group">
<span class="sig-name descname"><span class="pre">age_group</span></span><a class="headerlink" href="#O365.directory.User.age_group" title="Link to this definition"></a></dt>
<dd><p>The age group of the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> ageGroup</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.assigned_licenses">
<span class="sig-name descname"><span class="pre">assigned_licenses</span></span><a class="headerlink" href="#O365.directory.User.assigned_licenses" title="Link to this definition"></a></dt>
<dd><p>The licenses that are assigned to the user, including inherited (group-based) licenses.
<div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[assignedLicenses]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.assigned_plans">
<span class="sig-name descname"><span class="pre">assigned_plans</span></span><a class="headerlink" href="#O365.directory.User.assigned_plans" title="Link to this definition"></a></dt>
<dd><p>The plans that are assigned to the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[assignedPlans]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.birthday">
<span class="sig-name descname"><span class="pre">birthday</span></span><a class="headerlink" href="#O365.directory.User.birthday" title="Link to this definition"></a></dt>
<dd><p>The birthday of the user.  <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> datetime</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.business_phones">
<span class="sig-name descname"><span class="pre">business_phones</span></span><a class="headerlink" href="#O365.directory.User.business_phones" title="Link to this definition"></a></dt>
<dd><p>The telephone numbers for the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[str]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.city">
<span class="sig-name descname"><span class="pre">city</span></span><a class="headerlink" href="#O365.directory.User.city" title="Link to this definition"></a></dt>
<dd><p>The city where the user is located. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.company_name">
<span class="sig-name descname"><span class="pre">company_name</span></span><a class="headerlink" href="#O365.directory.User.company_name" title="Link to this definition"></a></dt>
<dd><p>The name of the company that the user is associated with. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.consent_provided_for_minor">
<span class="sig-name descname"><span class="pre">consent_provided_for_minor</span></span><a class="headerlink" href="#O365.directory.User.consent_provided_for_minor" title="Link to this definition"></a></dt>
<dd><p>Whether consent was obtained for minors. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> consentProvidedForMinor</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.country">
<span class="sig-name descname"><span class="pre">country</span></span><a class="headerlink" href="#O365.directory.User.country" title="Link to this definition"></a></dt>
<dd><p>The country or region where the user is located; for example, US or UK.
<div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.created">
<span class="sig-name descname"><span class="pre">created</span></span><a class="headerlink" href="#O365.directory.User.created" title="Link to this definition"></a></dt>
<dd><p>The date and time the user was created. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> datetime</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.department">
<span class="sig-name descname"><span class="pre">department</span></span><a class="headerlink" href="#O365.directory.User.department" title="Link to this definition"></a></dt>
<dd><p>The name of the department in which the user works. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.display_name">
<span class="sig-name descname"><span class="pre">display_name</span></span><a class="headerlink" href="#O365.directory.User.display_name" title="Link to this definition"></a></dt>
<dd><p>The name displayed in the address book for the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.employee_id">
<span class="sig-name descname"><span class="pre">employee_id</span></span><a class="headerlink" href="#O365.directory.User.employee_id" title="Link to this definition"></a></dt>
<dd><p>The employee identifier assigned to the user by the organization. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.fax_number">
<span class="sig-name descname"><span class="pre">fax_number</span></span><a class="headerlink" href="#O365.directory.User.fax_number" title="Link to this definition"></a></dt>
<dd><p>The fax number of the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="O365.directory.User.full_name">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">full_name</span></span><a class="headerlink" href="#O365.directory.User.full_name" title="Link to this definition"></a></dt>
<dd><p>Full Name (Name + Surname)
:rtype: str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.given_name">
<span class="sig-name descname"><span class="pre">given_name</span></span><a class="headerlink" href="#O365.directory.User.given_name" title="Link to this definition"></a></dt>
<dd><p>The given name (first name) of the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.hire_date">
<span class="sig-name descname"><span class="pre">hire_date</span></span><a class="headerlink" href="#O365.directory.User.hire_date" title="Link to this definition"></a></dt>
<dd><p>The type of the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.im_addresses">
<span class="sig-name descname"><span class="pre">im_addresses</span></span><a class="headerlink" href="#O365.directory.User.im_addresses" title="Link to this definition"></a></dt>
<dd><p>The instant message voice-over IP (VOIP) session initiation protocol (SIP)
addresses for the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.interests">
<span class="sig-name descname"><span class="pre">interests</span></span><a class="headerlink" href="#O365.directory.User.interests" title="Link to this definition"></a></dt>
<dd><p>A list for the user to describe their interests. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[str]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.is_resource_account">
<span class="sig-name descname"><span class="pre">is_resource_account</span></span><a class="headerlink" href="#O365.directory.User.is_resource_account" title="Link to this definition"></a></dt>
<dd><p>Don’t use – reserved for future use. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> bool</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.job_title">
<span class="sig-name descname"><span class="pre">job_title</span></span><a class="headerlink" href="#O365.directory.User.job_title" title="Link to this definition"></a></dt>
<dd><p>The user’s job title. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.last_password_change">
<span class="sig-name descname"><span class="pre">last_password_change</span></span><a class="headerlink" href="#O365.directory.User.last_password_change" title="Link to this definition"></a></dt>
<dd><p>The time when this Microsoft Entra user last changed their password or
when their password was created, whichever date the latest action was performed.
<div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.legal_age_group_classification">
<span class="sig-name descname"><span class="pre">legal_age_group_classification</span></span><a class="headerlink" href="#O365.directory.User.legal_age_group_classification" title="Link to this definition"></a></dt>
<dd><p>Used by enterprise applications to determine the legal age group of the user.
<div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> legalAgeGroupClassification</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.license_assignment_states">
<span class="sig-name descname"><span class="pre">license_assignment_states</span></span><a class="headerlink" href="#O365.directory.User.license_assignment_states" title="Link to this definition"></a></dt>
<dd><p>State of license assignments for this user.
Also indicates licenses that are directly assigned or the user inherited through
group memberships. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[licenseAssignmentState]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.mail">
<span class="sig-name descname"><span class="pre">mail</span></span><a class="headerlink" href="#O365.directory.User.mail" title="Link to this definition"></a></dt>
<dd><p>The SMTP address for the user, for example, <a class="reference external" href="mailto:jeff&#37;&#52;&#48;contoso&#46;com">jeff<span>&#64;</span>contoso<span>&#46;</span>com</a>. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.mail_nickname">
<span class="sig-name descname"><span class="pre">mail_nickname</span></span><a class="headerlink" href="#O365.directory.User.mail_nickname" title="Link to this definition"></a></dt>
<dd><p>The mail alias for the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.mailbox_settings">
<span class="sig-name descname"><span class="pre">mailbox_settings</span></span><a class="headerlink" href="#O365.directory.User.mailbox_settings" title="Link to this definition"></a></dt>
<dd><p>Settings for the primary mailbox of the signed-in user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> MailboxSettings</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.mobile_phone">
<span class="sig-name descname"><span class="pre">mobile_phone</span></span><a class="headerlink" href="#O365.directory.User.mobile_phone" title="Link to this definition"></a></dt>
<dd><p>The primary cellular telephone number for the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.my_site">
<span class="sig-name descname"><span class="pre">my_site</span></span><a class="headerlink" href="#O365.directory.User.my_site" title="Link to this definition"></a></dt>
<dd><p>The URL for the user’s site. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.object_id">
<span class="sig-name descname"><span class="pre">object_id</span></span><a class="headerlink" href="#O365.directory.User.object_id" title="Link to this definition"></a></dt>
<dd><p>The unique identifier for the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.office_location">
<span class="sig-name descname"><span class="pre">office_location</span></span><a class="headerlink" href="#O365.directory.User.office_location" title="Link to this definition"></a></dt>
<dd><p>The office location in the user’s place of business. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.on_premises_sam_account_name">
<span class="sig-name descname"><span class="pre">on_premises_sam_account_name</span></span><a class="headerlink" href="#O365.directory.User.on_premises_sam_account_name" title="Link to this definition"></a></dt>
<dd><p>Contains the on-premises samAccountName synchronized from the on-premises directory.
<div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.other_mails">
<span class="sig-name descname"><span class="pre">other_mails</span></span><a class="headerlink" href="#O365.directory.User.other_mails" title="Link to this definition"></a></dt>
<dd><p>A list of other email addresses for the user; for example:
[”<a class="reference external" href="mailto:bob&#37;&#52;&#48;contoso&#46;com">bob<span>&#64;</span>contoso<span>&#46;</span>com</a>”, “<a class="reference external" href="mailto:Robert&#37;&#52;&#48;fabrikam&#46;com">Robert<span>&#64;</span>fabrikam<span>&#46;</span>com</a>”]. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[str]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.password_policies">
<span class="sig-name descname"><span class="pre">password_policies</span></span><a class="headerlink" href="#O365.directory.User.password_policies" title="Link to this definition"></a></dt>
<dd><p>Specifies password policies for the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.password_profile">
<span class="sig-name descname"><span class="pre">password_profile</span></span><a class="headerlink" href="#O365.directory.User.password_profile" title="Link to this definition"></a></dt>
<dd><p>Specifies the password profile for the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> passwordProfile</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.past_projects">
<span class="sig-name descname"><span class="pre">past_projects</span></span><a class="headerlink" href="#O365.directory.User.past_projects" title="Link to this definition"></a></dt>
<dd><p>A list for the user to enumerate their past projects. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[str]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.postal_code">
<span class="sig-name descname"><span class="pre">postal_code</span></span><a class="headerlink" href="#O365.directory.User.postal_code" title="Link to this definition"></a></dt>
<dd><p>The postal code for the user’s postal address. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.preferred_data_location">
<span class="sig-name descname"><span class="pre">preferred_data_location</span></span><a class="headerlink" href="#O365.directory.User.preferred_data_location" title="Link to this definition"></a></dt>
<dd><p>The preferred data location for the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.preferred_language">
<span class="sig-name descname"><span class="pre">preferred_language</span></span><a class="headerlink" href="#O365.directory.User.preferred_language" title="Link to this definition"></a></dt>
<dd><p>The preferred language for the user. The preferred language format is based on RFC 4646.
<div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.preferred_name">
<span class="sig-name descname"><span class="pre">preferred_name</span></span><a class="headerlink" href="#O365.directory.User.preferred_name" title="Link to this definition"></a></dt>
<dd><p>The preferred name for the user.
<strong>Not Supported. This attribute returns an empty string</strong>.
<div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.provisioned_plans">
<span class="sig-name descname"><span class="pre">provisioned_plans</span></span><a class="headerlink" href="#O365.directory.User.provisioned_plans" title="Link to this definition"></a></dt>
<dd><p>The plans that are provisioned for the user.. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[provisionedPlan]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.proxy_addresses">
<span class="sig-name descname"><span class="pre">proxy_addresses</span></span><a class="headerlink" href="#O365.directory.User.proxy_addresses" title="Link to this definition"></a></dt>
<dd><p>For example: [“SMTP: <a class="reference external" href="mailto:bob&#37;&#52;&#48;contoso&#46;com">bob<span>&#64;</span>contoso<span>&#46;</span>com</a>”, “smtp: <a class="reference external" href="mailto:bob&#37;&#52;&#48;sales&#46;contoso&#46;com">bob<span>&#64;</span>sales<span>&#46;</span>contoso<span>&#46;</span>com</a>”].
<div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[str]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.responsibilities">
<span class="sig-name descname"><span class="pre">responsibilities</span></span><a class="headerlink" href="#O365.directory.User.responsibilities" title="Link to this definition"></a></dt>
<dd><p>A list for the user to enumerate their responsibilities. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[str]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.schools">
<span class="sig-name descname"><span class="pre">schools</span></span><a class="headerlink" href="#O365.directory.User.schools" title="Link to this definition"></a></dt>
<dd><p>A list for the user to enumerate the schools they attended <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[str]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.show_in_address_list">
<span class="sig-name descname"><span class="pre">show_in_address_list</span></span><a class="headerlink" href="#O365.directory.User.show_in_address_list" title="Link to this definition"></a></dt>
<dd><p>Represents whether the user should be included in the Outlook global address list.
<div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> bool</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.sign_in_sessions_valid_from">
<span class="sig-name descname"><span class="pre">sign_in_sessions_valid_from</span></span><a class="headerlink" href="#O365.directory.User.sign_in_sessions_valid_from" title="Link to this definition"></a></dt>
<dd><p>Any refresh tokens or session tokens (session cookies) issued before
this time are invalid. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> datetime</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.skills">
<span class="sig-name descname"><span class="pre">skills</span></span><a class="headerlink" href="#O365.directory.User.skills" title="Link to this definition"></a></dt>
<dd><p>A list for the user to enumerate their skills. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> list[str]</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.state">
<span class="sig-name descname"><span class="pre">state</span></span><a class="headerlink" href="#O365.directory.User.state" title="Link to this definition"></a></dt>
<dd><p>The state or province in the user’s address. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.street_address">
<span class="sig-name descname"><span class="pre">street_address</span></span><a class="headerlink" href="#O365.directory.User.street_address" title="Link to this definition"></a></dt>
<dd><p>The street address of the user’s place of business. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.surname">
<span class="sig-name descname"><span class="pre">surname</span></span><a class="headerlink" href="#O365.directory.User.surname" title="Link to this definition"></a></dt>
<dd><p>The user’s surname (family name or last name). <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.type">
<span class="sig-name descname"><span class="pre">type</span></span><a class="headerlink" href="#O365.directory.User.type" title="Link to this definition"></a></dt>
<dd><p>The type of the user. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.usage_location">
<span class="sig-name descname"><span class="pre">usage_location</span></span><a class="headerlink" href="#O365.directory.User.usage_location" title="Link to this definition"></a></dt>
<dd><p>A two-letter country code (ISO standard 3166). <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.user_principal_name">
<span class="sig-name descname"><span class="pre">user_principal_name</span></span><a class="headerlink" href="#O365.directory.User.user_principal_name" title="Link to this definition"></a></dt>
<dd><p>The user principal name (UPN) of the user.
The UPN is an Internet-style sign-in name for the user based on the Internet
standard RFC 822. <div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="O365.directory.User.user_type">
<span class="sig-name descname"><span class="pre">user_type</span></span><a class="headerlink" href="#O365.directory.User.user_type" title="Link to this definition"></a></dt>
<dd><p>A string value that can be used to classify user types in your directory.
<div style="line-height: 0; padding: 0; margin: 0"></div><div style="line-height: 0; padding: 0; margin: 0"></div>&nbsp;&nbsp; <strong>Type:</strong> str</p>
</dd></dl>

</dd></dl>

</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="connection.html" class="btn btn-neutral float-left" title="Connection" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="excel.html" class="btn btn-neutral float-right" title="Excel" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2025, alejcas.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>